package com.boil.qz.safekavass.model;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by ChenYong on 2017-05-26.
 * <br>
 * 微信发普通红包记录实体类。
 */
@Entity
@Table(name = "TB_WEIXIN_SENDREDPACK_RECORD")
public class WeixinSendredpackRecordEntity implements Serializable {
    /**
     * 序列化 ID
     */
    private static final long serialVersionUID = 3655637861998200737L;
    /**
     * 编号，主键
     */
    @Id
    @SequenceGenerator(name = "SgWeixinSendredpackRecord", sequenceName = "SE_WEIXIN_SENDREDPACK_RECORD", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SgWeixinSendredpackRecord")
    private Long id;
    /**
     * 商户订单号，唯一
     */
    private String mchBillno;
    /**
     * 商户号
     */
    private String mchId;
    /**
     * 红包单号
     */
    private String detailId;
    /**
     * 红包状态：sending-发放中；sent-已发放待领取；failed-发放失败；received-已领取；rfund_ing-退款中；refund-已退款
     */
    private String status;
    /**
     * 发放类型：api-通过api接口发放；upload-通过上传文件方式发放；activity-通过活动方式发放
     */
    private String sendType;
    /**
     * 红包类型：group-裂变红包；normal-普通红包
     */
    private String hbType;
    /**
     * 红包个数
     */
    private Integer totalNum;
    /**
     * 红包金额
     */
    private Integer totalAmount;
    /**
     * 失败原因
     */
    private String reason;
    /**
     * 红包发送时间
     */
    private String sendTime;
    /**
     * 红包退款时间
     */
    private String refundTime;
    /**
     * 红包退款金额
     */
    private Integer refundAmount;
    /**
     * 祝福语
     */
    private String wishing;
    /**
     * 活动描述
     */
    private String remark;
    /**
     * 活动名称
     */
    private String actName;
    /**
     * 领取红包的openid
     */
    private String openid;
    /**
     * 金额
     */
    private Integer amount;
    /**
     * 接收时间
     */
    private String rcvTime;
    /**
     * 签名
     */
    private String sign;
    /**
     * 返回状态码
     */
    private String returnCode;
    /**
     * 返回信息
     */
    private String returnMsg;
    /**
     * 业务结果
     */
    private String resultCode;
    /**
     * 错误代码
     */
    private String errCode;
    /**
     * 错误代码描述
     */
    private String errCodeDes;

    /**
     * 默认构造器。
     */
    public WeixinSendredpackRecordEntity() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMchBillno() {
        return mchBillno;
    }

    public void setMchBillno(String mchBillno) {
        this.mchBillno = mchBillno;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getDetailId() {
        return detailId;
    }

    public void setDetailId(String detailId) {
        this.detailId = detailId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getSendType() {
        return sendType;
    }

    public void setSendType(String sendType) {
        this.sendType = sendType;
    }

    public String getHbType() {
        return hbType;
    }

    public void setHbType(String hbType) {
        this.hbType = hbType;
    }

    public Integer getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(Integer totalNum) {
        this.totalNum = totalNum;
    }

    public Integer getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(Integer totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getRefundTime() {
        return refundTime;
    }

    public void setRefundTime(String refundTime) {
        this.refundTime = refundTime;
    }

    public Integer getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(Integer refundAmount) {
        this.refundAmount = refundAmount;
    }

    public String getWishing() {
        return wishing;
    }

    public void setWishing(String wishing) {
        this.wishing = wishing;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getActName() {
        return actName;
    }

    public void setActName(String actName) {
        this.actName = actName;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public String getRcvTime() {
        return rcvTime;
    }

    public void setRcvTime(String rcvTime) {
        this.rcvTime = rcvTime;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }

    public String getReturnMsg() {
        return returnMsg;
    }

    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getErrCodeDes() {
        return errCodeDes;
    }

    public void setErrCodeDes(String errCodeDes) {
        this.errCodeDes = errCodeDes;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WeixinSendredpackRecordEntity that = (WeixinSendredpackRecordEntity) o;

        return id != null ? id.equals(that.id) : that.id == null;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("WeixinSendredpackRecordEntity{");
        sb.append("id=").append(id);
        sb.append(", mchBillno='").append(mchBillno).append('\'');
        sb.append(", mchId='").append(mchId).append('\'');
        sb.append(", detailId='").append(detailId).append('\'');
        sb.append(", status='").append(status).append('\'');
        sb.append(", sendType='").append(sendType).append('\'');
        sb.append(", hbType='").append(hbType).append('\'');
        sb.append(", totalNum=").append(totalNum);
        sb.append(", totalAmount=").append(totalAmount);
        sb.append(", reason='").append(reason).append('\'');
        sb.append(", sendTime='").append(sendTime).append('\'');
        sb.append(", refundTime='").append(refundTime).append('\'');
        sb.append(", refundAmount=").append(refundAmount);
        sb.append(", wishing='").append(wishing).append('\'');
        sb.append(", remark='").append(remark).append('\'');
        sb.append(", actName='").append(actName).append('\'');
        sb.append(", openid='").append(openid).append('\'');
        sb.append(", amount=").append(amount);
        sb.append(", rcvTime='").append(rcvTime).append('\'');
        sb.append(", sign='").append(sign).append('\'');
        sb.append(", returnCode='").append(returnCode).append('\'');
        sb.append(", returnMsg='").append(returnMsg).append('\'');
        sb.append(", resultCode='").append(resultCode).append('\'');
        sb.append(", errCode='").append(errCode).append('\'');
        sb.append(", errCodeDes='").append(errCodeDes).append('\'');
        sb.append('}');
        return sb.toString();
    }
}